package com.vogue.supplymall.order.domain.service.impl;

import com.vogue.ssm.database.dao.BaseDao;
import com.vogue.supplymall.common.domain.dto.RefundMaxCountInfo;
import com.vogue.supplymall.order.domain.dao.RefundDetailDao;
import com.vogue.supplymall.order.domain.model.RefundDetail;
import com.vogue.supplymall.order.domain.service.RefundDetailService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @aouthor: zhangliang
 * @date: Create in 2018-03-16
 */
@Service("refundDetailService")
public class RefundDetailServiceImpl extends BaseServiceImpl<RefundDetail, Long> implements RefundDetailService {
    @Resource
    private RefundDetailDao refundDetailDao;

    public RefundDetailServiceImpl(BaseDao<RefundDetail, Long> baseDao) {
        super(baseDao);
    }

    @Override
    public List<Map<String, Object>> findRefundOrderDetail(Long refundOrderId) {

        return refundDetailDao.findRefundOrderDetail(refundOrderId);
    }

    @Override
	public List<Map<String, Object>> findRefundOrderRefundUpload(Long refundOrderId) {
    	
    	return refundDetailDao.findRefundOrderRefundUpload(refundOrderId);

	}

	@Override
    public List<Map<String, Object>> getRefundMaxQuantity(RefundMaxCountInfo refundMaxCountInfo) {

        return refundDetailDao.getRefundMaxQuantity(refundMaxCountInfo);
    }

    @Override
    public Integer findRefundquantitySum(Long oiid) {
        return refundDetailDao.findRefundquantitySum(oiid);
    }
}
